package uk.ac.ncl.carrent.tests;

import static org.junit.Assert.*;

import org.junit.Test;

import uk.ac.ncl.carrent.*;
import java.util.*;

public class DrivingLicenceTest {
	

	@Test
	public void testDrivingLicence() {
		Person p = new Person("Shiwei", "He", "5/9/1987");
		Calendar birth = p.getDob();
		String issueDate = "1/1/2000";
		Calendar issue = new GregorianCalendar(2000, 1, 1);
		boolean isFull = true;
		DrivingLicence licence = new DrivingLicence(p, issueDate, isFull);
		assertEquals("Shiwei He", licence.getName());
		assertEquals(birth, licence.getDOB());
		assertEquals(issue, licence.getIssueDate());
		assertEquals(true, licence.getType());
		assertEquals(p, licence.getPerson());
		assertEquals(13, licence.getYear());
	}

}
